package com.cswangdao.controller.admin;

import com.cswangdao.domain.vo.RoleValueLabelVo;
import com.cswangdao.result.PageResult;
import com.cswangdao.result.Result;
import com.cswangdao.service.RoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/admin/role")
@RestController
@Slf4j
public class AdminRoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/options")
    public Result<PageResult<RoleValueLabelVo>> options(){
        log.info("角色信息获取");
        PageResult<RoleValueLabelVo> pageResult =roleService.options();
        return Result.success(pageResult);
    }
}
